import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'index.dart';

class GuideSettingPage extends GetView<GuideSettingController> {
  const GuideSettingPage({super.key});

  // 主视图
  Widget _buildView() {
    return ListView(
      children: [
        Divider(),
        ListTile(
          title: Text("ip address"),
          trailing: Text(controller.robotSDKIPAddress),
          onTap: controller.onTapIP,
        ),
        Divider(),
        ListTile(
          title: Text("original poi"),
          trailing: Text(controller.originPoi),
          onTap: controller.onTapPoi,
        ),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<GuideSettingController>(
      init: GuideSettingController(),
      id: "guidesettin",
      builder: (_) {
        return Scaffold(
          appBar: AppBar(title: const Text("GuideSettingPage")),
          body: SafeArea(child: _buildView()),
        );
      },
    );
  }
}
